import { ArrayMaxSize, IsArray, IsBoolean, IsInt, IsNotEmpty, IsNumber, IsOptional, IsString, MaxLength, Min } from "class-validator";

export default class CreateDto{
    @MaxLength(30)
    @IsNotEmpty()
    @IsString()
    name:string;

    @ArrayMaxSize(100)
    @IsArray()
    @IsOptional()
    menus:Array<number>;

    @MaxLength(100)
    @IsString()
    @IsOptional()
    remark:string;

    @IsBoolean({})
    @IsOptional()
    enable:boolean;

    @Min(0)
    @IsInt({})
    @IsOptional()
    sort:number;
}